package com.homeorder.service;

import java.util.List;

import com.homeorder.dao.HibDaoImpl;
import com.homeorder.entity.OrderInfo;

public class OrderServiceImpl implements OrderService {
	HibDaoImpl baseDao;

	public void setBaseDao(HibDaoImpl baseDao) {
		this.baseDao = baseDao;
	}

	public int addOrder(OrderInfo order) {
		return baseDao.Update(order, 1);
	}

	@SuppressWarnings("unchecked")
	public List<OrderInfo> getOrders() {
		return (List<OrderInfo>) baseDao.query("from OrderInfo", null);
	}
}
